package com.yuanfeng.base.controller;


import com.yuanfeng.base.dto.ModularizationdDTO;
import com.yuanfeng.commoms.util.ResponseResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName BaseModularizationdController
 * @Description  组件化 页面
 * @Author ty
 * @Date 2023-07-04 17:58:51
 * @Version 1.0
 **/
@RestController
@RequestMapping("baseModularizationd")
public class BaseModularizationdController extends BaseController{

    /*
     * 添加或修改 组件化页面
     */
    @PostMapping("/modularizationdAddOrUPdate")
    public ResponseResult ModularizationdAddOrUPdate(@RequestBody ModularizationdDTO param) {
        return  baseModularizationdService.ModularizationdAddOrUPdate(param);
    }

    /*
     * 查询组件化页面 列表
     */
    @PostMapping("/queryModularizationdAll")
    public ResponseResult queryModularizationdAll(@RequestBody ModularizationdDTO param) {
        return  baseModularizationdService.queryModularizationdAll(param);
    }

    /*
     * 查询组件化页面 列表
     */
    @PostMapping("/queryModularizationdById")
    public ResponseResult queryModularizationdById(@RequestBody ModularizationdDTO param) {
        return  baseModularizationdService.queryModularizationdById(param);
    }

    /*
     * 删除   组件化页面
     */
    @PostMapping("/modularizationdDelete")
    public ResponseResult modularizationdDelete(@RequestBody ModularizationdDTO param) {
        return  baseModularizationdService.modularizationdDelete(param);
    }

    /**
     * 将页面设置是否使用
     */
    @PostMapping("/modularizationdUpdateStart")
    public ResponseResult modularizationdUpdateStart(@RequestBody ModularizationdDTO param) {
        return  baseModularizationdService.modularizationdUpdateStart(param);
    }

    /**
     * 根据id 查询系统默认页面
     * @return
     */
    @PostMapping("/modularizationdDefault")
    public ResponseResult ModularizationdDefaultByPageId(@RequestBody ModularizationdDTO param) {
        return  baseModularizationdService.ModularizationdDefaultByPageId(param);
    }


    /**
     * 二级页面使用
     */
    @PostMapping("/updateSecondLevelStart")
    public ResponseResult UpdateSecondLevelStart(@RequestBody ModularizationdDTO param) {
        ResponseResult result=baseModularizationdService.UpdateSecondLevelStart(param);
        return  result;
    }

    /**
     * 获取首页页面
     *
     * @return
     */
    @PostMapping("/modularizationdIndex")
    public ResponseResult modularizationdUpdateIndex() {
        ResponseResult result=baseModularizationdService.modularizationdUpdateIndex();
        return  result;
    }
}
